package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.LoginRecordMapper;
import org.shop.entity.LoginRecord;
import org.shop.service.LoginRecordService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class LoginRecordServiceImpl extends BaseServiceImpl<LoginRecord, Long> implements LoginRecordService{
	
	@Autowired
	private LoginRecordMapper loginRecordMapper;

	@Override
	public Map<String, Object> getLoginRecordInfo(Map<String, Object> paramMap) {
		List<Map<String, Object>> mapList = loginRecordMapper.getLoginRecordInfo(paramMap);
        Integer count = loginRecordMapper.getLoginRecordInfoCount(paramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", mapList);
        return dataMap;
	}

	@Override
	public int delLoginRecordOfYearByUserId(Map<String, Object> paramMap) {
		return loginRecordMapper.delLoginRecordOfYearByUserId(paramMap);
	}
	
}